package br.com.q7solucoes.parsercinemaq7.tests;


import br.com.q7solucoes.commons.wordpress.WPPost;
import br.com.q7solucoes.commons.wordpress.WPPostDAO;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.GregorianCalendar;
import java.util.List;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author elenilson
 */
public class TestesIgor {
    
    public static void main(String[] args) throws SQLException, ClassNotFoundException {
        WPPostDAO wPPostDAO = new WPPostDAO("novolazerigor", "mysql.erick.q7solucoes.com.br",
                "erickvargner", "123456", "2gt4ev");

        List<String> categorias = new ArrayList<String>();
        categorias.add("cinema");
        List<String> tags = new ArrayList<String>();
        tags.add("Box Cinemas");

        WPPost wPPost = new WPPost("TITULO7", "CONTEUDO", "LINK", "http://www.lazerjp.com.br/wp-content/gallery/aleatorias/lazer.png",
                GregorianCalendar.getInstance().getTime(), categorias, tags);

        int rowAffected = wPPostDAO.add(wPPost);
        System.out.println(">> linhas afetadas: " + rowAffected);
    }
}
